<h1 matDialogTitle>
  {{ 'Attach' | translate }}
</h1>
<form class="ix-form-container" [formGroup]="form" (submit)="onSubmit()">
  <ix-fieldset>
    <ix-unused-disk-select
      formControlName="dev"
      valueField="name"
      [label]="helptextSystemBootenv.memberDiskLabel | translate"
      [tooltip]="helptextSystemBootenv.memberDiskTooltip | translate"
      [required]="true"
    ></ix-unused-disk-select>
    <ix-checkbox
      [formControlName]="expand.fcName"
      [label]="expand.label | translate"
      [tooltip]="expand.tooltip | translate"
    ></ix-checkbox>
  </ix-fieldset>

  <ix-form-actions>
    <button mat-button type="button" ixTest="cancel" [matDialogClose]="false">
      {{ 'Cancel' | translate }}
    </button>

    <button
      *ixRequiresRoles="[Role.DiskWrite]"
      mat-button
      type="submit"
      color="primary"
      ixTest="save"
      [disabled]="form.invalid || isFormLoading"
    >
      {{ 'Save' | translate }}
    </button>
  </ix-form-actions>
</form>

@if (isFormLoading) {
  <ix-fake-progress-bar></ix-fake-progress-bar>
}
